export default {
    bind:function(el,binding) {
        el.addEventListener('click',function(){
            const a = document.createElement('a')
            const url = binding.value
            const headers = {
                'content-type': 'text/plain'
            }
            fetch(url,{ headers }).then(res=>res.blob).then(blob => {
                a.href = URL.createObjectURL(blob)
                console.log(a.href)
            })
        })
    }
}